package entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

@Entity
public class Customer extends SaleLead implements Serializable {
    private String customerUserName;
    private String customerPassword;
    
    @ManyToOne(cascade= CascadeType.ALL)
    private CustomerExecutive customerExecutive;
    @OneToMany
    private Collection<PurchaseOrder> purchaseOrders = new ArrayList<PurchaseOrder>();

    public CustomerExecutive getCustomerExecutive() {
        return customerExecutive;
    }

    public void setCustomerExecutive(CustomerExecutive customerExecutive) {
        this.customerExecutive = customerExecutive;
    }

    public String getCustomerPassword() {
        return customerPassword;
    }

    public void setCustomerPassword(String customerPassword) {
        this.customerPassword = customerPassword;
    }

    public String getCustomerUserName() {
        return customerUserName;
    }

    public void setCustomerUserName(String customerUserName) {
        this.customerUserName = customerUserName;
    }

    public Collection<PurchaseOrder> getPurchaseOrders() {
        return purchaseOrders;
    }

    public void setPurchaseOrders(Collection<PurchaseOrder> purchaseOrders) {
        this.purchaseOrders = purchaseOrders;
    }
}
